<template>
  <div class="app">
    <!-- 一级路由出口 -->
    <keep-alive>
      <!-- 需要缓存的视图组件 -->
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <!-- 不需要缓存的视图组件 -->
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>

export default {
  
};
</script>

<style lang="scss" scoped>
.app {
  height: 100%;
  margin: 0 auto;
  max-width: 10rem;
  position: relative;
}
</style>